package com.clouds.wms.service;

import java.util.List;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import com.clouds.wms.bean.Purmi;
import com.clouds.wms.bean.Purmj;
import com.clouds.wms.dao.PurmiDao;
import com.clouds.wms.exception.SysException;
import com.clouds.wms.util.PagesBean;
@Service("purmiService")
public class PurmiServiceImpl implements PurmiService {
	@Resource(name="purmiDao")
	private PurmiDao purmiDao;
	@Override
	public PagesBean getPurmiList(String miaa, String miab, String startMiac,String endMiac, String miad, int offset, int pageSize)	throws SysException {
		return purmiDao.getPurmiList(miaa, miab, startMiac, endMiac, miad, offset, pageSize);
	}

	@Override
	public PagesBean getPurmjList(String mjaa, int offset, int pageSize)throws SysException {
		return purmiDao.getPurmjList(mjaa, offset, pageSize);
	}

	@Override
	public Purmi getPurmi(String miaa) throws SysException {
		return purmiDao.getPurmi(miaa);
	}

	@Override
	public int delPurmimj(String miaa) throws SysException {
		purmiDao.delPurmi(miaa);
		purmiDao.delPurmj(miaa);
		return 0;
	}

	@Override
	public int[] savePurmjList(Purmi purmi,List<Purmj> purmiList) throws SysException {
		purmiDao.savePurmi(purmi);
		return purmiDao.savePurmjList(purmiList);
	}

	@Override
	public Purmi getPurmiBySql(String sql) throws SysException {
		
		return purmiDao.getPurmiBySql(sql);
	}

	

}
